package com.test.learnkotlin.ui.activity

import androidx.lifecycle.lifecycleScope
import com.test.learnkotlin.BR
import com.test.learnkotlin.R
import com.test.learnkotlin.base.BaseActivity
import com.test.learnkotlin.databinding.ActivityFlowBinding
import com.test.learnkotlin.viewmodel.FlowViewModel


class FlowActivity : BaseActivity<FlowViewModel, ActivityFlowBinding>() {

    override fun initView() {
        super.initView()
        //https://juejin.cn/post/7001071604855734285
        lifecycleScope.launchWhenCreated {

            // https://www.jianshu.com/p/02a2512df434
            //lifecycle.repeatOnLifecycle 前来救场，lifecycle-runtime-ktx 2.4.0-alpha01
        }

    }

    override fun initData() {
        super.initData()
    }

    override fun initEvent() {
        super.initEvent()
    }

    override fun variableId(): Int = BR.mFlowViewModel

    override fun getContentLayoutId(): Int = R.layout.activity_flow
}